<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  <div class="box"></div>
</body>
<script>

  Array.prototype.avg = function(){
    return this.reduce((prev,val)=>prev+val, 0) / this.length;
  }

  // const arr = [5,6,7,8];
  // arr.push("hello");
  // console.log( arr.push );
  // console.log( arr );
  
  // const arr2 = [5,6,7,8];
  // console.log(arr === arr2);
  // console.log(arr.push === arr2.push);

  // const arr = [5,6,7,8];
  // arr.avg();
  // console.log(arr.avg());
  // console.log(arr.avg);
  
  // const arr2 = [2,3,4,5]
  // arr2.avg();
  // console.log(arr2.avg());
  // console.log(arr2.avg);
  
  // const arr3 = [];
  // console.log(arr3.avg)



  // 选择排序
  // 冒泡排序

  // Array.prototype.sort = function(){
  //   console.log("自定义排序")
  // }

  // const arr = [];
  // arr.sort();

  // const arr2 = [];
  // arr2.sort();


  // console.log("hello".constructor)
  // console.log("hello".constructor === String)

  console.dir(document.querySelector(".box"));

</script>
</html>